#include "main.h"
#include "apiBase.h"

C_apiCommunicate apiCommunicate;

C_apiBase::C_apiBase(/* args */)
{
    p_C_apiCommunicate = NULL;
    p_C_apiCommunicate = &apiCommunicate;
}

C_apiBase::~C_apiBase()
{
    delete p_C_apiCommunicate;
    p_C_apiCommunicate = NULL;
}

//单例模式
C_apiCommunicate * C_apiBase::getC_apiCommunicate(void)
{
    if(p_C_apiCommunicate != NULL){
        return p_C_apiCommunicate;
    }
    else{
        spdlog::info("C_apiCommunicate new error");
        return NULL;
    }
}